<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>PropTypes</title>
	<script src="../js/react.js"></script>
    <script src="../js/react-dom.js"></script>
    <script src="../js/browser.min.js"></script>
</head>
<body>
	<h1>PropTypes</h1>
	<div id="example"></div>
	<script type="text/babel">
		var PageSubject = React.createClass({
			getDefaultProps: function() {
				return {
					subject: "default subject!!!"
				};
			},
			propTypes: {
				subject: React.PropTypes.string.isRequired
			},
			render: function() {
				return (<div className="subject-container">
					<h1>{this.props.subject}</h1>
				</div>);
			}
		});

		var subject = "Ki mi ni!";
		ReactDOM.render(
			<PageSubject/>,
			document.querySelector("#example")
		);
	</script>
</body>
</html>